package com.dmap.admin.service.backgroundv2;

import com.dmap.admin.controller.backgroundv2.param.UserV2Param;
import com.dmap.admin.controller.backgroundv2.param.UserV2SelectParam;
import com.dmap.admin.po.User;

import java.util.List;

/**
 * \* User: helei
 * \* Date: 04/05/18
 * \* Description:用户相关接口
 * \
 */
public interface UserV2Service {

    User insertUser(UserV2Param param);

    boolean updateUser(UserV2Param param);

    boolean deleteByIdList(List<Long> idList);

    User selectById(Long id);

    User selectByAccountOrHandphone(String param);

    /**
     * 验证 Account 或 Handphone 是否已存在
     *
     * @param account   用户账号
     * @param handphone 手机号
     * @return
     */
    User validateAccountOrHandphoneIsExist(String account, String handphone);

    User selectByLoginV2Param(String account, String handphone);

    int countByDepartmentId(Long departmentId);

    List<User> selectByUserV2SelectParam(UserV2SelectParam param);

    int countByUserV2SelectParam(UserV2SelectParam param);

    int setAllUserLoginWrongNumZero();

}